<extend name="Public/pub"/>
<block name="head">
	<link href="__MOBILE__/css/article.css" rel="stylesheet">
</block>
<block name="body">
	<include file="Public:category" />
	<div class="container" >
		<div class="list" id="content-list">
			<include file="article_list"/>
		</div>
		<button class="btn btn-get-more" data-url="{$next_page}">
			点击加载更多
		</button>
    </div>
</block>
<block name="script">
<script>
	var haveData							=	true;
	 $(function(){
		  heightlight_bottom_nav("{:U('Article/index')}");
		  $('.category-box').find('a[href="'+'{$url}'+'"]').addClass('active');
	}); 
	function LoadPage(){
		var currentPage = $('#next').attr('p') ? $('#next').attr('p') : 1;
		$.get("{:U('Article/ajaxArticleList?category='.$id)}",{p:currentPage},function(result){
			if(result.errno==0){
				$('#ajax-article-list').append(result.content);
				$('#next').attr('p',result.p);
				if(result.p>$('#next').attr('total-page')){
					$('#next').html('木有了，亲');
					$('#next').attr('disabled',true);
					$('#next').addClass('disabled');
				}
			}
			
		},'json');	
	}
</script>	 
</block>